package de.mmis.core.base.gui;

import javax.swing.JPanel;

public abstract class AbstractRepresentationComponent<D> extends
		AbstractGUIComponent<D> implements DeviceRepresentationComponent<D> {
	private static final long serialVersionUID = -8145746761387570594L;

	public AbstractRepresentationComponent(long priority,
			Class<? super D> applicableClass, String defaultDisplayName) {
		super(priority, applicableClass, defaultDisplayName);
	}

	@Override
	public boolean isApplicableForRepresenting(Class<?> clazz) {
		return applicableClass.isAssignableFrom(clazz);
	}

	@Override
	public JPanel getRepresentationPanel() {
		return this;
	}
}
